package com.heima.controller;


import com.heima.pojo.entity.Role;
import com.heima.service.RoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 用户角色表 前端控制器
 * </p>
 *
 * @author ljk
 * @since 2024-10-21
 */
@RestController
@RequestMapping("/api/user-service/role")
@Api(tags = "角色相关接口")
@Slf4j
public class RoleController {
    @Autowired
    private RoleService roleService;

    @GetMapping
    @ApiOperation("角色列表")
    public List<Role> list(){
        return roleService.list();
    }
}
